# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kimageformats
pkgver=5.86.0
pkgrel=1
pkgdesc='Image format plugins for Qt5'
arch=(x86_64)
url='https://community.kde.org/Frameworks'
license=(LGPL)
depends=(qt5-base)
makedepends=(extra-cmake-modules karchive libavif openexr libheif)
optdepends=('karchive: plugin for Krita and OpenRaster images'
            'libavif: AVIF format support'
            'openexr: EXR format support'
            'libheif: HEIF format support')
groups=(kf5)
source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('a5b92d6ea22911a68c3fc52913fc0840e4bd5943779c504ad4bcd620a0b9a985'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF \
    -DKIMAGEFORMATS_HEIF=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
